<template>
  <Detail :showType="'song'" :songDetail="item" :songList="songList" :comment="songSheetComment" />
</template>


<script setup lang="ts">
import Detail from "@/view/components/Detail.vue"
import { ICommentItem, getSongSheet, getSongSheetComment } from "@/fetch/song.ts"
import { computed, ref } from "vue"
import { useRoute } from "vue-router";
import { ISingerDetailItem, ISongItem } from "@/fetch/type";
const route = useRoute()
const item = computed(() => route.query as unknown as ISongItem)
const songList = ref<ISingerDetailItem[]>([])
const songSheetComment = ref<ICommentItem[]>([])
getSongSheet(item.value.id).then(({ data }) => {
  songList.value = data.data
})
getSongSheetComment(item.value.id).then(({ data }) => {
  songSheetComment.value = data.data
})
</script>
<style lang="scss" scoped></style>